import { defineStore } from 'pinia'
export const useSystemInfo = defineStore('useSystemInfo', () => {
  const systemInfo = ref<UniApp.GetSystemInfoResult>()

  const subscriptionsConfig = ref<{
    sub: boolean
  }>()
  /**
   * 是否连接网络
   */
  const isConnected = ref(true)

  /**
   * 是否授权 获取地址信息
   */
  const userLocation = ref(false)

  /** 页面停留时间 */
  const view_duration = ref(0)
  /** 进入时间 */
  const in_duration = ref(0)

  return { systemInfo, subscriptionsConfig, isConnected, userLocation, view_duration, in_duration }
})
